﻿#ifndef TRADESERVICE_H
#define TRADESERVICE_H

#include <QObject>
#include "tradenetworkaccessmanager.h"
#include "user.h"

class TradeService : public QObject
{
    Q_OBJECT
public:
    explicit TradeService(QObject *parent = nullptr);

    void getQrCode(QWidget *widget, QString username, int day, QString totalAmount);

    void queryUserInfo(QWidget *widget, QString username);

signals:
    void getQrCodeSuccess(QString qrCode);

    void queryUserInfoSuccess(User &user, QString companyName, QString serverDate, bool isValid);
public slots:

private:
    TradeNetworkAccessManager *manager;
};

#endif // TRADESERVICE_H
